<template>
    <div class="content">
        <div class="title">
            <h3>智能停车<span>Smart parking</span></h3>
        </div>
        <div class="car-info">
            <div class="car-sum"><span>总数：100</span>|<span>剩余：58</span></div>
            <div class="car-news">
                <ul>
                    <li>
                        <div class="car-news-left">
                            <p>1号停车场车位数量正常</p>
                            <span>08:00</span>
                        </div>
                        <div class="car-news-right">
                            <span class="normal">正常</span>
                            <span class="new">新消息</span>
                        </div>
                    </li>
                    <li>
                        <div class="car-news-left">
                            <p>2号停车场车位数量正常</p>
                            <span>08:00</span>
                        </div>
                        <div class="car-news-right">
                            <span class="normal">正常</span>
                            <span class="new">新消息</span>
                        </div>
                    </li>
                    <li>
                        <div class="car-news-left">
                            <p>3号停车场-A车位数量较紧张</p>
                            <span>08:00</span>
                        </div>
                        <div class="car-news-right">
                            <span class="early">预警</span>
                            <span class="new">新消息</span>
                        </div>
                    </li>
                    <li>
                        <div class="car-news-left">
                            <p>4号停车场-A车位数量过于紧张</p>
                            <span>08:00</span>
                        </div>
                        <div class="car-news-right">
                            <span class="warning">警示</span>
                            <span class="new">新消息</span>
                        </div>
                    </li>
                    <li>
                        <div class="car-news-left">
                            <p>4号停车场-A车位数量过于紧张</p>
                            <span>08:00</span>
                        </div>
                        <div class="car-news-right">
                            <span class="warning">警示</span>
                            <span class="new">新消息</span>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="small-title">
            <h3>车辆通行记录</h3>
        </div>
        <table>
            <tr>
                <th>设备ID</th>
                <th>通行车牌</th>
                <th>通行时间</th>
            </tr>
            <tr>
                <td>1001</td>
                <td>琼B AB2266</td>
                <td>2020-12-27</td>
            </tr>
            <tr>
                <td>1002</td>
                <td>琼B V55889</td>
                <td>2020-12-27</td>
            </tr>
            <tr>
                <td>1003</td>
                <td>琼B N22330</td>
                <td>2020-12-27</td>
            </tr>
            <tr>
                <td>1004</td>
                <td>琼B C20458</td>
                <td>2020-12-27</td>
            </tr>
        </table>
    </div>
</template>

<script>
export default {}
</script>

<style lang="less" scoped>
@import '../../../assets/less/school.less';
.content {
    width: 350px;
    padding-left: 15px;
    .car-info {
        .car-sum {
            width: 60%;
            margin-top: 10px;
            color: #fff;
            font-size: 16px;
            padding: 2px 0;
            display: flex;
            justify-content: space-around;
            align-items: center;
            border: 1px solid #fff;
            background-image: @small-bg;
        }
    }
    .car-news {
        position: relative;
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 4px;
            width: 10px;
            height: 100%;
            border-radius: 5px;
            background-image: linear-gradient(to right, #68519f, #85c8e5);
        }
        ul {
            height: 215px;
            margin: 20px 0;
            padding-left: 20px;
            overflow-y: scroll;
            scrollbar-width: none;
            li {
                color: #fff;
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                position: relative;
                margin: 10px 0;
                transition: all 0.3s;
                cursor: pointer;
                &::before {
                    content: '';
                    width: 8px;
                    height: 8px;
                    background: #85c8e5;
                    border-radius: 50%;
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    left: -15px;
                }
                &:hover {
                    background: rgba(154, 153, 180, 0.6);
                }
                .car-news-left {
                    p {
                        font-size: 14px;
                    }
                    span {
                        font-size: 12px;
                    }
                }
                .car-news-right {
                    span {
                        display: inline-block;
                        padding: 0 5px;
                        height: 20px;
                        line-height: 20px;
                        font-size: 12px;
                        background: transparent;
                        margin-left: 5px;
                    }
                    // normal正常 new新消息 early预警 warning警示
                    .normal {
                        background: rgb(146, 233, 251);
                    }
                    .new {
                        background: rgb(188, 172, 222);
                    }
                    .early {
                        background: rgb(246, 189, 138);
                    }
                    .warning {
                        background: rgb(221, 92, 135);
                    }
                }
            }
        }
        ul::-webkit-scrollbar {
            display: none;
        }
    }
    table {
        width: 100%;
        height: 170px;
        margin: 10px 0;
        color: #fff;
        tr {
            width: 100%;
            height: 30px;
            line-height: 30px;
            display: flex;
            margin-bottom: 5px;
            background: #9499cf;
            th {
                flex: 1;
                text-align: center;
                font-size: 16px;
            }
            td {
                flex: 1;
                font-size: 14px;
                text-align: center;
            }
        }
    }
}
</style>